/**
 * Copyright (c) 2013-Now http://dreamcode123321.com All rights reserved.
 */
package com.jeesite.modules.ab.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 住户信息Entity
 * @author dc
 * @version 2020-07-12
 */
@Table(name="ab_house", alias="a", columns={
		@Column(name="house_code", attrName="houseCode", label="house_code", isPK=true),
		@Column(name="floor_code", attrName="floorCode", label="floor_code"),
		@Column(name="floor_name", attrName="floorName", label="floor_name", isQuery=false),
		@Column(name="name", attrName="name", label="用户名", queryType=QueryType.LIKE),
		@Column(name="area", attrName="area", label="面积", isQuery=false),
		@Column(name="equip_no", attrName="equipNo", label="测温id", isQuery=false),
		@Column(name="addr", attrName="addr", label="地址", queryType=QueryType.LIKE),
		@Column(name="reg_date", attrName="regDate", label="注册时间", isQuery=false),
		@Column(name="equip_type", attrName="equipType", label="测温型号", isQuery=false),
		@Column(name="typical", attrName="typical", label="典型用户", isQuery=false),
		@Column(name="fa_type", attrName="faType", label="阀型号", isQuery=false),
		@Column(name="fa_id", attrName="faId", label="阀ID", isQuery=false),
		@Column(name="fa_open", attrName="faOpen", label="阀锁", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注", isQuery=false),
	}, orderBy="a.house_code DESC"
)
public class AbHouse extends DataEntity<AbHouse> {
	
	private static final long serialVersionUID = 1L;
	private String houseCode;		// house_code
	private String floorCode;		// floor_code
	private String floorName;		// floor_name
	private String name;		// 用户名
	private String area;		// 面积
	private String equipNo;		// 测温id
	private String addr;		// 地址
	private Date regDate;		// 注册时间
	private String equipType;		// 测温型号
	private Integer typical;		// 典型用户
	private String faType;		// 阀型号
	private String faId;		// 阀ID
	private Integer faOpen;		// 阀锁
	
	public AbHouse() {
		this(null);
	}

	public AbHouse(String id){
		super(id);
	}
	
	public String getHouseCode() {
		return houseCode;
	}

	public void setHouseCode(String houseCode) {
		this.houseCode = houseCode;
	}
	
	@NotBlank(message="floor_code不能为空")
	@Length(min=0, max=64, message="floor_code长度不能超过 64 个字符")
	public String getFloorCode() {
		return floorCode;
	}

	public void setFloorCode(String floorCode) {
		this.floorCode = floorCode;
	}
	
	@NotBlank(message="floor_name不能为空")
	@Length(min=0, max=200, message="floor_name长度不能超过 200 个字符")
	public String getFloorName() {
		return floorName;
	}

	public void setFloorName(String floorName) {
		this.floorName = floorName;
	}
	
	@NotBlank(message="用户名不能为空")
	@Length(min=0, max=45, message="用户名长度不能超过 45 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="面积不能为空")
	@Length(min=0, max=45, message="面积长度不能超过 45 个字符")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@NotBlank(message="测温id不能为空")
	@Length(min=0, max=45, message="测温id长度不能超过 45 个字符")
	public String getEquipNo() {
		return equipNo;
	}

	public void setEquipNo(String equipNo) {
		this.equipNo = equipNo;
	}
	
	@NotBlank(message="地址不能为空")
	@Length(min=0, max=200, message="地址长度不能超过 200 个字符")
	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="注册时间不能为空")
	public Date getRegDate() {
		return regDate;
	}

	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}
	
	@Length(min=0, max=45, message="测温型号长度不能超过 45 个字符")
	public String getEquipType() {
		return equipType;
	}

	public void setEquipType(String equipType) {
		this.equipType = equipType;
	}

	@Length(min=0, max=200, message="阀型号长度不能超过 200 个字符")
	public String getFaType() {
		return faType;
	}

	public void setFaType(String faType) {
		this.faType = faType;
	}
	
	@Length(min=0, max=200, message="阀ID长度不能超过 200 个字符")
	public String getFaId() {
		return faId;
	}

	public void setFaId(String faId) {
		this.faId = faId;
	}

	public Integer getTypical() {
		return typical;
	}

	public void setTypical(Integer typical) {
		this.typical = typical;
	}

	public Integer getFaOpen() {
		return faOpen;
	}

	public void setFaOpen(Integer faOpen) {
		this.faOpen = faOpen;
	}
}